import table from '@/components/dt/table/render.js'
import clueCustomerMgr from '@/biz/customer/clueCustomer.js'
import CustomerMgr from '@/biz/customer/customerOpt.js'
import pointMgr from '@/biz/customerForCode/point'

function options1(_this) {
  return [
    {
      field: 'prizeName',
      title: '奖品名称',
      minWidth: 100
    },
    {
      field: 'lotteryCount',
      title: '总数',
      minWidth: 150
    },
    {
      field: 'prizes',
      title: '已中奖数',
      minWidth: 150
    },
    {
      field: 'remainingPrize',
      title: '剩余奖品数',
      minWidth: 80
    },
    {
      field: 'todayPrizes',
      title: '今日中奖数量',
      minWidth: 120
    },
    {
      field: 'lotteryStatusStr',
      title: '状态',
      minWidth: 140
    }
  ]
}

function options2(_this) {
  return [
    {
      type: 'index',
      title: '序号',
      minWidth: 60
    },
    {
      field: 'phoneNo',
      title: '手机号',
      minWidth: 100
    },
    {
      field: 'firstParticipationTime',
      title: '首次抽奖时间',
      minWidth: 150
    },
    {
      field: 'participationCount',
      title: '抽奖次数',
      minWidth: 150
    },
    {
      field: 'lotteryStatus',
      title: '是否中奖',
      minWidth: 80
    },
    {
      field: 'helpTask',
      title: '助力任务完成情况',
      minWidth: 150
    },
    {
      field: 'source',
      title: '用户来源',
      minWidth: 140
    },
    {
      field: 'statusName',
      title: '当前客户进度',
      minWidth: 140
    },
    {
      field: 'handles',
      title: '操作',
      minWidth: 100,
      fixed: 'right',
      slots: {
        default: (params, h) => {
          let btns = []
          let item = params.row

          btns.push({
            title: params.row.hereto ? '查看详情' : '',
            event: 'getDetail',
            data: item
          })

          return table.cell.btns(_this, h, btns)
        }
      }
    }
  ]
}

function options3(_this) {
  return [
    {
      type: 'index',
      title: '序号',
      minWidth: 60
    },
    {
      field: 'phoneNo',
      title: '手机号',
      minWidth: 100
    },
    {
      field: 'lotteryTime',
      title: '中奖时间',
      minWidth: 150
    },
    {
      field: 'prizeName',
      title: '奖品',
      minWidth: 150
    }
  ]
}
export default {
  options1,
  options2,
  options3
}
